<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="姓名" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="头像" prop="headPort">
        <el-input
          v-model="queryParams.headPort"
          placeholder="请输入头像"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="邮箱" prop="email">
        <el-input
          v-model="queryParams.email"
          placeholder="请输入邮箱"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="年龄" prop="age">
        <el-input
          v-model="queryParams.age"
          placeholder="请输入年龄"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="性别" prop="gender">
        <el-input
          v-model="queryParams.gender"
          placeholder="请输入性别"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="民族" prop="national">
        <el-input
          v-model="queryParams.national"
          placeholder="请输入民族"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="职务" prop="position">
        <el-input
          v-model="queryParams.position"
          placeholder="请输入职务"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="职称" prop="title">
        <el-input
          v-model="queryParams.title"
          placeholder="请输入职称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学位" prop="degree">
        <el-input
          v-model="queryParams.degree"
          placeholder="请输入学位"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学历" prop="xl">
        <el-input
          v-model="queryParams.xl"
          placeholder="请输入学历"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学科方向" prop="xkfx">
        <el-input
          v-model="queryParams.xkfx"
          placeholder="请输入学科方向"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="英文名" prop="eName">
        <el-input
          v-model="queryParams.eName"
          placeholder="请输入英文名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="承担项目" prop="cdxm">
        <el-input
          v-model="queryParams.cdxm"
          placeholder="请输入承担项目"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="科技成果" prop="kjcg">
        <el-input
          v-model="queryParams.kjcg"
          placeholder="请输入科技成果"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="专家贡献" prop="zjgx">
        <el-input
          v-model="queryParams.zjgx"
          placeholder="请输入专家贡献"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="参与项目" prop="cyxm">
        <el-input
          v-model="queryParams.cyxm"
          placeholder="请输入参与项目"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="获奖情况" prop="hjqk">
        <el-input
          v-model="queryParams.hjqk"
          placeholder="请输入获奖情况"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="评审项目" prop="psxm">
        <el-input
          v-model="queryParams.psxm"
          placeholder="请输入评审项目"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="评审意见" prop="psyj">
        <el-input
          v-model="queryParams.psyj"
          placeholder="请输入评审意见"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="政治面貌" prop="zzmm">
        <el-input
          v-model="queryParams.zzmm"
          placeholder="请输入政治面貌"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="籍贯" prop="jg">
        <el-input
          v-model="queryParams.jg"
          placeholder="请输入籍贯"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="出生年月" prop="birthday">
        <el-input
          v-model="queryParams.birthday"
          placeholder="请输入出生年月"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="职工号/学号" prop="empNumbedr">
        <el-input
          v-model="queryParams.empNumbedr"
          placeholder="请输入职工号/学号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="身份证号码" prop="idNumber">
        <el-input
          v-model="queryParams.idNumber"
          placeholder="请输入身份证号码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="入职时间" prop="entryTime">
        <el-date-picker clearable
          v-model="queryParams.entryTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择入职时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="公司代码" prop="schoolCode">
        <el-input
          v-model="queryParams.schoolCode"
          placeholder="请输入公司代码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="公司名称" prop="schoolName">
        <el-input
          v-model="queryParams.schoolName"
          placeholder="请输入公司名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="公司代码" prop="collegeCode">
        <el-input
          v-model="queryParams.collegeCode"
          placeholder="请输入公司代码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="公司名称" prop="collegeName">
        <el-input
          v-model="queryParams.collegeName"
          placeholder="请输入公司名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="部系代码" prop="deptCode">
        <el-input
          v-model="queryParams.deptCode"
          placeholder="请输入部系代码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="专家级别" prop="expertLevel">
        <el-input
          v-model="queryParams.expertLevel"
          placeholder="请输入专家级别"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="部系名称" prop="deptName">
        <el-input
          v-model="queryParams.deptName"
          placeholder="请输入部系名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="电话" prop="phone">
        <el-input
          v-model="queryParams.phone"
          placeholder="请输入电话"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="科研团队类型" prop="kytdlx">
        <el-input
          v-model="queryParams.kytdlx"
          placeholder="请输入科研团队类型"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="科研团队代码" prop="kytddm">
        <el-input
          v-model="queryParams.kytddm"
          placeholder="请输入科研团队代码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="人员类别 zj/kyry/js/xs/fz   专家/教授/学生/科研/辅助" prop="rylb">
        <el-input
          v-model="queryParams.rylb"
          placeholder="请输入人员类别 zj/kyry/js/xs/fz   专家/教授/学生/科研/辅助"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="人员状态 在职/离职" prop="userState">
        <el-input
          v-model="queryParams.userState"
          placeholder="请输入人员状态 在职/离职"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="科研团队名称" prop="kytdmc">
        <el-input
          v-model="queryParams.kytdmc"
          placeholder="请输入科研团队名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['pm:aKyinfoTb:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['pm:aKyinfoTb:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['pm:aKyinfoTb:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['pm:aKyinfoTb:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="aKyinfoTbList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="主键" align="center" prop="id" />
      <el-table-column label="姓名" align="center" prop="name" />
      <el-table-column label="头像" align="center" prop="headPort" />
      <el-table-column label="邮箱" align="center" prop="email" />
      <el-table-column label="年龄" align="center" prop="age" />
      <el-table-column label="性别" align="center" prop="gender" />
      <el-table-column label="民族" align="center" prop="national" />
      <el-table-column label="职务" align="center" prop="position" />
      <el-table-column label="职称" align="center" prop="title" />
      <el-table-column label="学位" align="center" prop="degree" />
      <el-table-column label="学历" align="center" prop="xl" />
      <el-table-column label="学科方向" align="center" prop="xkfx" />
      <el-table-column label="学术专长" align="center" prop="xszz" />
      <el-table-column label="英文名" align="center" prop="eName" />
      <el-table-column label="承担项目" align="center" prop="cdxm" />
      <el-table-column label="科技成果" align="center" prop="kjcg" />
      <el-table-column label="专家贡献" align="center" prop="zjgx" />
      <el-table-column label="参与项目" align="center" prop="cyxm" />
      <el-table-column label="获奖情况" align="center" prop="hjqk" />
      <el-table-column label="评审项目" align="center" prop="psxm" />
      <el-table-column label="评审意见" align="center" prop="psyj" />
      <el-table-column label="政治面貌" align="center" prop="zzmm" />
      <el-table-column label="籍贯" align="center" prop="jg" />
      <el-table-column label="出生年月" align="center" prop="birthday" />
      <el-table-column label="职工号/学号" align="center" prop="empNumbedr" />
      <el-table-column label="人员类型" align="center" prop="userType" />
      <el-table-column label="身份证号码" align="center" prop="idNumber" />
      <el-table-column label="入职时间" align="center" prop="entryTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.entryTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="专家类别 推荐/遴选" align="center" prop="expertType" />
      <el-table-column label="公司代码" align="center" prop="schoolCode" />
      <el-table-column label="公司名称" align="center" prop="schoolName" />
      <el-table-column label="公司代码" align="center" prop="collegeCode" />
      <el-table-column label="公司名称" align="center" prop="collegeName" />
      <el-table-column label="部系代码" align="center" prop="deptCode" />
      <el-table-column label="专家级别" align="center" prop="expertLevel" />
      <el-table-column label="部系名称" align="center" prop="deptName" />
      <el-table-column label="电话" align="center" prop="phone" />
      <el-table-column label="科研团队类型" align="center" prop="kytdlx" />
      <el-table-column label="科研团队代码" align="center" prop="kytddm" />
      <el-table-column label="人员类别 zj/kyry/js/xs/fz   专家/教授/学生/科研/辅助" align="center" prop="rylb" />
      <el-table-column label="人员状态 在职/离职" align="center" prop="userState" />
      <el-table-column label="科研团队名称" align="center" prop="kytdmc" />
      <el-table-column label="备注" align="center" prop="remark" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['pm:aKyinfoTb:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['pm:aKyinfoTb:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改科研人员信息对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="姓名" prop="name">
          <el-input v-model="form.name" placeholder="请输入姓名" />
        </el-form-item>
        <el-form-item label="头像" prop="headPort">
          <el-input v-model="form.headPort" placeholder="请输入头像" />
        </el-form-item>
        <el-form-item label="邮箱" prop="email">
          <el-input v-model="form.email" placeholder="请输入邮箱" />
        </el-form-item>
        <el-form-item label="年龄" prop="age">
          <el-input v-model="form.age" placeholder="请输入年龄" />
        </el-form-item>
        <el-form-item label="性别" prop="gender">
          <el-input v-model="form.gender" placeholder="请输入性别" />
        </el-form-item>
        <el-form-item label="民族" prop="national">
          <el-input v-model="form.national" placeholder="请输入民族" />
        </el-form-item>
        <el-form-item label="职务" prop="position">
          <el-input v-model="form.position" placeholder="请输入职务" />
        </el-form-item>
        <el-form-item label="职称" prop="title">
          <el-input v-model="form.title" placeholder="请输入职称" />
        </el-form-item>
        <el-form-item label="学位" prop="degree">
          <el-input v-model="form.degree" placeholder="请输入学位" />
        </el-form-item>
        <el-form-item label="学历" prop="xl">
          <el-input v-model="form.xl" placeholder="请输入学历" />
        </el-form-item>
        <el-form-item label="学科方向" prop="xkfx">
          <el-input v-model="form.xkfx" placeholder="请输入学科方向" />
        </el-form-item>
        <el-form-item label="学术专长" prop="xszz">
          <el-input v-model="form.xszz" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="英文名" prop="eName">
          <el-input v-model="form.eName" placeholder="请输入英文名" />
        </el-form-item>
        <el-form-item label="承担项目" prop="cdxm">
          <el-input v-model="form.cdxm" placeholder="请输入承担项目" />
        </el-form-item>
        <el-form-item label="科技成果" prop="kjcg">
          <el-input v-model="form.kjcg" placeholder="请输入科技成果" />
        </el-form-item>
        <el-form-item label="专家贡献" prop="zjgx">
          <el-input v-model="form.zjgx" placeholder="请输入专家贡献" />
        </el-form-item>
        <el-form-item label="参与项目" prop="cyxm">
          <el-input v-model="form.cyxm" placeholder="请输入参与项目" />
        </el-form-item>
        <el-form-item label="获奖情况" prop="hjqk">
          <el-input v-model="form.hjqk" placeholder="请输入获奖情况" />
        </el-form-item>
        <el-form-item label="评审项目" prop="psxm">
          <el-input v-model="form.psxm" placeholder="请输入评审项目" />
        </el-form-item>
        <el-form-item label="评审意见" prop="psyj">
          <el-input v-model="form.psyj" placeholder="请输入评审意见" />
        </el-form-item>
        <el-form-item label="政治面貌" prop="zzmm">
          <el-input v-model="form.zzmm" placeholder="请输入政治面貌" />
        </el-form-item>
        <el-form-item label="籍贯" prop="jg">
          <el-input v-model="form.jg" placeholder="请输入籍贯" />
        </el-form-item>
        <el-form-item label="出生年月" prop="birthday">
          <el-input v-model="form.birthday" placeholder="请输入出生年月" />
        </el-form-item>
        <el-form-item label="职工号/学号" prop="empNumbedr">
          <el-input v-model="form.empNumbedr" placeholder="请输入职工号/学号" />
        </el-form-item>
        <el-form-item label="身份证号码" prop="idNumber">
          <el-input v-model="form.idNumber" placeholder="请输入身份证号码" />
        </el-form-item>
        <el-form-item label="入职时间" prop="entryTime">
          <el-date-picker clearable
            v-model="form.entryTime"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择入职时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="公司代码" prop="schoolCode">
          <el-input v-model="form.schoolCode" placeholder="请输入公司代码" />
        </el-form-item>
        <el-form-item label="公司名称" prop="schoolName">
          <el-input v-model="form.schoolName" placeholder="请输入公司名称" />
        </el-form-item>
        <el-form-item label="公司代码" prop="collegeCode">
          <el-input v-model="form.collegeCode" placeholder="请输入公司代码" />
        </el-form-item>
        <el-form-item label="公司名称" prop="collegeName">
          <el-input v-model="form.collegeName" placeholder="请输入公司名称" />
        </el-form-item>
        <el-form-item label="部系代码" prop="deptCode">
          <el-input v-model="form.deptCode" placeholder="请输入部系代码" />
        </el-form-item>
        <el-form-item label="专家级别" prop="expertLevel">
          <el-input v-model="form.expertLevel" placeholder="请输入专家级别" />
        </el-form-item>
        <el-form-item label="部系名称" prop="deptName">
          <el-input v-model="form.deptName" placeholder="请输入部系名称" />
        </el-form-item>
        <el-form-item label="电话" prop="phone">
          <el-input v-model="form.phone" placeholder="请输入电话" />
        </el-form-item>
        <el-form-item label="科研团队类型" prop="kytdlx">
          <el-input v-model="form.kytdlx" placeholder="请输入科研团队类型" />
        </el-form-item>
        <el-form-item label="科研团队代码" prop="kytddm">
          <el-input v-model="form.kytddm" placeholder="请输入科研团队代码" />
        </el-form-item>
        <el-form-item label="人员类别 zj/kyry/js/xs/fz   专家/教授/学生/科研/辅助" prop="rylb">
          <el-input v-model="form.rylb" placeholder="请输入人员类别 zj/kyry/js/xs/fz   专家/教授/学生/科研/辅助" />
        </el-form-item>
        <el-form-item label="人员状态 在职/离职" prop="userState">
          <el-input v-model="form.userState" placeholder="请输入人员状态 在职/离职" />
        </el-form-item>
        <el-form-item label="科研团队名称" prop="kytdmc">
          <el-input v-model="form.kytdmc" placeholder="请输入科研团队名称" />
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listAKyinfoTb, getAKyinfoTb, delAKyinfoTb, addAKyinfoTb, updateAKyinfoTb } from "@/api/pm/aKyinfoTb";

export default {
  name: "AKyinfoTb",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 科研人员信息表格数据
      aKyinfoTbList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        name: null,
        headPort: null,
        email: null,
        age: null,
        gender: null,
        national: null,
        position: null,
        title: null,
        degree: null,
        xl: null,
        xkfx: null,
        xszz: null,
        eName: null,
        cdxm: null,
        kjcg: null,
        zjgx: null,
        cyxm: null,
        hjqk: null,
        psxm: null,
        psyj: null,
        zzmm: null,
        jg: null,
        birthday: null,
        empNumbedr: null,
        userType: null,
        idNumber: null,
        entryTime: null,
        expertType: null,
        schoolCode: null,
        schoolName: null,
        collegeCode: null,
        collegeName: null,
        deptCode: null,
        expertLevel: null,
        deptName: null,
        phone: null,
        kytdlx: null,
        kytddm: null,
        rylb: null,
        userState: null,
        kytdmc: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询科研人员信息列表 */
    getList() {
      this.loading = true;
      listAKyinfoTb(this.queryParams).then(response => {
        this.aKyinfoTbList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        name: null,
        headPort: null,
        email: null,
        age: null,
        gender: null,
        national: null,
        position: null,
        title: null,
        degree: null,
        xl: null,
        xkfx: null,
        xszz: null,
        eName: null,
        cdxm: null,
        kjcg: null,
        zjgx: null,
        cyxm: null,
        hjqk: null,
        psxm: null,
        psyj: null,
        zzmm: null,
        jg: null,
        birthday: null,
        empNumbedr: null,
        userType: null,
        idNumber: null,
        entryTime: null,
        expertType: null,
        schoolCode: null,
        schoolName: null,
        collegeCode: null,
        collegeName: null,
        deptCode: null,
        expertLevel: null,
        deptName: null,
        phone: null,
        kytdlx: null,
        kytddm: null,
        rylb: null,
        userState: null,
        kytdmc: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加科研人员信息";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getAKyinfoTb(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改科研人员信息";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateAKyinfoTb(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addAKyinfoTb(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除科研人员信息编号为"' + ids + '"的数据项？').then(function() {
        return delAKyinfoTb(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('pm/aKyinfoTb/export', {
        ...this.queryParams
      }, `aKyinfoTb_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
